<?
//include_once("/var/www/html/new/d/common/header.html");

//upload 03/24;
//include ("../common/autoload.php");
//include ("/var/www/html/new/com.inc.php");
//include_once("../class/Member.php");
//include_once("../class/ProOrder.php");

//$ac=$GLOBALS['_ac'];
//$pw=$GLOBALS['_pw'];
//$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
//$memberID=$_SESSION['sid'];
//$m=new Member($s,$memberID);
//$m_info=$m->info();
//返回用户类型
//$object=saleProOrderObject($memberID,$s,$m_info['dtype']);
//降序排序
//function sortByOrderm($a,$b){
	//if($a['order']>$b['order']) return -1;
	//if($a['order']<$b['order']) return 1;
	//return 0;
//}
   // $object=saleProOrderObject($memberID,$s,$m_info['dtype']);
//一个月内的销售量
	//$monthSales= $object->monthSaleOrders();
	//$out=uasort($monthSales,"sortByOrderm");
	//print_r($monthSales);
	//foreach($monthSales as $lid=>$val)
	//{
		//$Utitle.=$val['title'].',';
		//$Utnum.=$val['tnum'].',';
		
		
	//}
	//$Utitle=substr($Utitle,0,-1);
	//$Utnum=substr($Utnum,0,-1);
	//print_r($monthSales);
//$sale = new \pft\Prod\Sale($GLOBALS['le'], $_SESSION['sid']);
//$prodsum_arr=array();
//$salepids=$sale->salePros();
//foreach($salepids as $key=>$v)
//{
 // $prodsum_arr[$v['lid']]=$v['title'];
//}
//$prodsum_arr=array_unique($prodsum_arr);
//$newprod_arr=array();
//foreach($prodsum as $lid=>$ltitle)
//{
  // $records=$s -> Order_Globle_Search( 
    // "","", "$lid", "", "", "", "", "", "", "",
     //"$st", "$ed", "", "", "", "", "", "", "1", "1",
     //"0", "", "2", "0","","0","0", "0","","",
      //"", "", "", "", "");

//}
//include_once '/var/www/html/new/com.inc.php';
//$ac=$GLOBALS['_ac'];
//$pw=$GLOBALS['_pw'];
//$s = new SoapClient(null,array("location" => "http://localhost/open/openService/pft_insideMX.php","uri" => "www.16u.com?ac_16u=$ac|pw_16u=$pw|auth_16u=true"));
//$aid=$_SESSION['sid'];
//$btime=date('Y-m-d',strtotime("-30days"));
//$etime=date('Y-m-d');
//$bt= $btime .' 00:00:00';
//$et = $etime .' 23:59:59'; 

//$x = simplexml_load_string($s -> Order_Globle_Search( 
    // "","$aid", "", "", "", "", "", "", "", "",
     //"$bt", "$et", "", "", "", "1", "", "", "1", "1",
     //"0", "1000", "0", "0","","0","0", "0","","",
      //"", "", "", "", ""));
	
	

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head>
<link rel="stylesheet" type="text/css" href="http://www.12301.cc/css/select2.css">
<script type="text/javascript" src="http://www.12301.cc/js/jquery-1.8.0.min.js"></script>
</head>
<body>
	<style type="text/css">
		#saleReprotMod{ width:600px;}
		#ctrlContainer{ margin-bottom:5px;}
		#ctrlContainer label{ position:relative; top:1px; font-size:12px; cursor:pointer}
		#ctrlContainer input.dateTrigger{ position:relative; top:3px; cursor:pointer; margin-right:1px; margin-left:15px;}
		#echartContainer{ height:400px; border:1px solid #e1e1e1; border-radius:3px; padding:8px; background:rgb(247,247,247)}
		#echartContainerCon{ height:100%; width:100%;}
		#s2id_jqSelect{ width:359px;}
		/*.select2-container{ display:block; margin-bottom:10px;}*/
		.select2-container .select2-choice{ broder-radius:2px; border-color:#e1e1e1}
		#startTimeInp{ width:217px; height:32px; padding:0 5px; padding-left:8px; margin-bottom:5px; border:1px solid #e1e1e1; border-radius:2px; background:url(http://www.12301.cc/images/dateIcon.png) no-repeat 99%}
		.select2-container .select2-choice{ height:32px; line-height:32px;}
		.select2-container .select2-choice .select2-arrow{ width:30px;}
		#saleReprotMod .btnW{ margin-top:10px; text-align:right}
		#saleReprotMod .tp{ margin-top:10px; padding-bottom:8px; margin-bottom:6px; border-bottom:1px solid #E1E1E1}
		#saleReprotMod .tp .txt{ height:16px; line-height:16px; padding:0; margin:0; padding-left:3px; border-left:3px solid #3E3E3E; font-size:14px; color:#3E3E3E; font-weight:bold}
		#saleReprotMod .tp .icon{ display:inline-block; width:10px; height:10px; margin-right:3px; background:#008EC1;}
		/* 日历插件样式 */
		#calendarPanel{ width:231px; height:208px; padding:5px 0px; background:url(http://www.12301.cc/images/calendarPannelWrap.gif) no-repeat 0 0}
		#calendarPanel .calTopW{ width:100%; position:relative; height:28px;}
		#calendarPanel .selectW{ overflow:hidden; margin:0 30px; text-align:center;}
		#calendarPanel .calTopW input{ position:absolute; top:3px; display:block; width:22px; height:19px; cursor:pointer; font-size:0; border:0 none; background:none;}
		#calendarPanel #prevMonth{ left:10px;}
		#calendarPanel #nextMonth{ right:9px;}
		#calendarPanel .selectW select{ height:24px; line-height:24px; width:77px;}
		#calendarYear{ margin-right:5px;}
		#calendarTable thead{ height:28px;}
		#calendarTable thead th{ text-align:center; font-weight:bold;}
		#calendarTable tbody{ }
		#calendarTable tbody td{ height:23px; border-right:1px solid #ececec;border-bottom:1px solid #ececec}
		#saleReprotMod .endTimetip{ display:none; font-size:12px; color:#9c9c9c}
		#saleReprotMod .echartBtn{ display:inline-block; height:32px; line-height:32px; padding:0 30px; font-size:12px; color:#fff; border-radius:3px; cursor:pointer; broder:1px solid #fff; margin-right:10px;}
		#saleReprotMod .echartBtn.query{ margin-left:20px; background:#d87329; border-color:#a95416}
		#saleReprotMod .echartBtn.query:hover{ background:#eb7d2c;}
		#saleReprotMod .echartBtn.refresh{ background:#50b350; border-color:#2d852d}
		#saleReprotMod .echartBtn.refresh:hover{ background:#60c760; border-color:#4cae4c}
	    .btnW{display:none;}
	</style>
    <div id="saleReprotMod" class="saleReprotMod">
	    <div class="tp"><p class="txt">销量统计报表</p></div>
	    <div id="ctrlContainer" class="ctrlContainer">
		    <!--<input type="text" name="btime3" id="startTimeInp" class="startTimeInp" onmouseup="SelectDate(this,'yyyy-MM-dd',0,0)" value="2015-03-03">-->
           <select name="lid" id="jqSelect">
               <?
               if($monthSales){
			    foreach($monthSales as $lid=>$v){ 
                ?>
	           <option value="<?=$lid?>"><?=$v['title']?></option>
	           <?}}else{?>
	           <option value="">请选择景区</option>
	           <?}?>
            </select>
		    <input id="threeDayTrigger" checked="checked" class="dateTrigger threeDayTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-3days'))?>"/><label for="threeDayTrigger">3天内</label>
		    <input id="weekTrigger" class="dateTrigger weekTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-7days'))?>"/><label for="weekTrigger">1周内</label>
		    <input id="monthTrigger" class="dateTrigger monthTrigger" type="radio" name="dateTrigger" value="<?=date('Y-m-d',strtotime('-30days'))?>"/><label for="monthTrigger">1个月内</label>
			<!--<span class="endTimetip">结束时间默认至今天</span>-->
	    </div>
	    <div id="echartContainer" class="echartContainer"><div id="echartContainerCon" class="echartContainerCon"></div></div>
	    <div class="btnW">
		    <span id="queryChartBtn" class="echartBtn query">查询</span>
		    <span style="margin-right:0" id="refreshChartBtn" class="echartBtn refresh">刷新</span>
	    </div>
    </div>

	<script type="text/javascript" src="http://www.12301.cc/js/echarts-2.2.0/build/dist/echarts-all.js"></script>
	<script type="text/javascript" src="http://www.12301.cc/js/global/www.12301.cc.global.js"></script>
    <script type="text/javascript" src="http://www.12301.cc/js/zy_Calendar.js"></script>
    <script type="text/javascript" src="http://www.12301.cc/js/select2.js"></script>
	<script type="text/javascript" src="http://www.12301.cc/js/zpie_sale_reportz.js"></script>
</body>
</html>
    